@page
@{ Layout = "_LayoutHome"; }
@section Styles{
    <style>
        .el-form-item {
            margin-bottom: 0px;
        }
        body,html {
            padding: 0;
            margin: 0;
        }
    </style>
}
<div class="rounded-0 shadow p-3 bg-white sticky-top">
    <div class="fw-bolder text-center">
        测评中心
    </div>
</div>
<div class="p-5">
    <div>
        <el-form v-on:submit.native.prevent :inline="true" :model="form">
            <el-form-item label="">
                <el-input prefix-icon="el-icon-search" v-model="form.keyWords" placeholder="关键字"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button icon="el-icon-search" v-on:click="btnSearchClick">查 询</el-button>
            </el-form-item>
        </el-form>
    </div>
     <div v-if="total>0" class="mt-5">
        <div class="row g-5">
            <div class="col-xl-6 col-lg-6 col-md-12 col-12" v-for="(paper,index) in list">
                <div class="card shadow-none rounded-0 card-hover-with-bl border-start-3 border-top-0 border-end-0 border-bottom-0" style="cursor:auto;">
                    <div class="card-body">
                        <div class="row align-items-center g-3">
                            <div class="col">
                                <p class="mb-3 card-title">
                                    {{ paper.title }}
                                </p>
                                <ul class="list-inline lh-3 m-0">
                                    <li class="list-inline-item">
                                        有效期：{{ paper.examStartDateTimeStr }}-{{ paper.examEndDateTimeStr }}
                                    </li>
                                    <li class="list-inline-item fw-bold text-success" v-if="paper.configId>0">
                                        测评结果：{{ paper.configName }}
                                    </li>
                                </ul>
                            </div>
                            <div class="col-auto">
                                <el-button type="success" plain class="rounded-pill" disabled v-if="paper.submitType==='Submit'">已提交</el-button>
                                <el-button type="warning" plain icon="el-icon-s-order" class="rounded-pill" v-on:click.stop="btnViewClick(paper)" v-else>开始测评</el-button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="my-5 text-center">
            <el-button class="border-0 rounded-pill" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
            <small v-else>没有更多了</small>
        </div>
    </div>
    <div class="pt-10" v-else>
        <el-empty></el-empty>
    </div>
</div>

@section Scripts{
    <script src="/sitefiles/assets/js/home/exam/examAssessment.js" type="text/javascript"></script>
}